package com.itheima.demo12_模板设计模式;

public abstract class Driver {
    public void open() {
        System.out.println("开门");
    }

    public void fire() {
        System.out.println("点火");
    }

    //姿势
    public abstract void pos();

    public void stop() {
        System.out.println("刹车");
    }

    public void close() {
        System.out.println("熄火");
    }

    //开车
    public void drive(){
        open();
        fire();
        pos();//直接调用抽象方法。this.pos();
        stop();
        close();
    }
}
